package com.wyz.saas.common.view.airpanel

import android.app.Activity

interface AirPanel {

    interface Control {
        fun openPanel()
        fun closePanel()
        fun isOpen(): Boolean
    }

    interface Packer : Control {
        fun setup(panelListener: PanelListener)
        fun setOnStateChangedListener(listener: OnStateChangedListener)
    }

    interface Panel : Packer {
        fun adjustPanelHeight(heightMeasureSpec: Int)
    }

    interface Helper : Panel, PanelListener {
        fun setup(activity: Activity)
        fun calculateHeightMeasureSpec(heightMeasureSpec: Int): Int
    }

    interface PanelListener {
        fun requestHideSoftKeyboard()
    }

    interface OnStateChangedListener {
        fun onPanelStateChanged(isOpen: Boolean)
        fun onSoftKeyboardStateChanged(isOpen: Boolean)
    }
}